Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Set readonly flag to false when begin new generic txn #2946

Conversation

fregataa
Copy link
Member

@fregataa fregataa commented Oct 23, 2024

ExtendedAsyncSAEngine begins readonly sessions by setting postgres_readonly flag of a given connection and it causes an error when any other generic transactions in the same connection try to insert or update.

<'asyncpg.exceptions.ReadOnlySQLTransactionError'>: cannot execute UPDATE in a read-only transaction

Let's set the postgres_readonly flag to false when begin generic sessions.

Checklist: (if applicable)

  • Milestone metadata specifying the target backport version

Copy link
Member Author

fregataa commented Oct 23, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @fregataa and the rest of your teammates on Graphite Graphite

@github-actions github-actions bot added comp:manager Related to Manager component size:XS ~10 LoC labels Oct 23, 2024
@fregataa fregataa added this to the 24.09 milestone Oct 23, 2024
@fregataa fregataa marked this pull request as ready for review October 23, 2024 09:48
@fregataa fregataa added this pull request to the merge queue Oct 23, 2024
Merged via the queue into main with commit e8664f6 Oct 23, 2024
24 checks passed
@fregataa fregataa deleted the topic/10-23-fix_reset_readonly_flag_to_false_when_begin_new_generic_transaction branch October 23, 2024 09:55
lablup-octodog pushed a commit that referenced this pull request Oct 23, 2024
Backported-from: main (24.12)
Backported-to: 24.09
Backport-of: 2946
github-merge-queue bot pushed a commit that referenced this pull request Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:manager Related to Manager component size:XS ~10 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant